import {TableColumnCtx, TableProps} from 'element-plus'
import ListTable from '@/component/list-table/ListTable.vue'

type ListTableInstance = InstanceType<typeof ListTable>

interface Column<T = any> extends Partial<Omit<TableColumnCtx<T>, 'prop' | 'label'>> {
    prop: string
    label: string
}

type ColumnList = Column[]

interface ListTableProps<T = any> extends Partial<Omit<TableProps<T>, 'data'>> {
    data: T[],
    columnList: ColumnList
    loading?: boolean
}

export type {ListTableInstance, Column, ColumnList, ListTableProps}